﻿using System;
using System.Windows.Media.Imaging;
using ZXing;

namespace CameraBanking
{
    public class FoundBarcodeEventArgs : EventArgs
    {
        /// <summary>
        /// WriteableBitmap used to decode the barcode.
        /// </summary>
        public WriteableBitmap ResultWriteableBitmap { get; set; }

        /// <summary>
        /// Result of decoding a bar code within an image.
        /// </summary>
        public string TextResult { get; set; }


        public string FormatResult { get; set; }

        public FoundBarcodeEventArgs(WriteableBitmap WriteableBitmapUsed, Result ResultFound)
            : base()
        {
            this.ResultWriteableBitmap = WriteableBitmapUsed;
            this.TextResult = ResultFound.Text;
            this.FormatResult = ResultFound.BarcodeFormat.ToString();
        }
    }
}
